var HEXCodes = new Array(256);
var k = 0;
var HEX = new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");

for (i = 0; i < 16; i++){
	for (j = 0; j < 16; j++){
		HEXCodes[k] = HEX[i] + HEX[j];
		k++;
	}
} 

function ChangeColors(r, g, b){
	alert("aca");
	body = document.getElementsByTagName("body")[0];
	body.style.backgroundColor="#"+HEXCodes[r]+HEXCodes[g]+HEXCodes[b]; 
}

function changeBackgroundColor(){
	var body = document.getElementsByTagName("body")[0];
	var color = document.getElementById("backgroundCol");
	if(color.value == 'Z'){
		alert("implementar personalizar");
	} else {
	body.style.backgroundColor = '#' + color.value;
	}
}
function changeSidebar(){
	var sidebar = document.getElementById("sideBar");
	var color = document.getElementById("sideBarCol");
	if(color.value == 'Z'){
		alert("implementar personalizar");
	} else {
	sidebar.style.backgroundColor = '#' + color.value;
	}
}